.podLogs {
  display: flex;
  flex-direction: column;
  padding: 8px;

  .error {
    margin-bottom: 16px;
  }

  .toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;

    :global(.ant-select) {
      min-width: 200px;
    }

    :global(.ant-space) {
      flex: 1;
      gap: 8px;
    }

    .searchButton {
      color: rgba(0, 0, 0, 0.45);
      transition: color 0.3s;
      cursor: pointer;
      padding: 0;
      margin: 0 4px;
      font-size: 14px;
      vertical-align: middle;
      display: inline-flex;
      align-items: center;

      &:hover {
        color: rgba(0, 0, 0, 0.85);
      }

      &.active {
        color: #1677ff;
      }
    }

    .searchInput {
      :global {
        .ant-input-affix-wrapper {
          background-color: #ffffff;
          border-color: #d9d9d9;
          padding: 4px 8px;

          .ant-input-suffix {
            margin-left: 2px;
          }

          .ant-input-clear-icon {
            margin-left: 2px;
            margin-right: 2px;
          }

          &:hover {
            border-color: #4096ff;
          }

          &:focus,
          &-focused {
            border-color: #1677ff;
            box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
          }
        }

        .ant-input {
          background-color: transparent;
          color: rgba(0, 0, 0, 0.88);

          &::placeholder {
            color: rgba(0, 0, 0, 0.25);
          }
        }

        .ant-input-clear-icon {
          color: rgba(0, 0, 0, 0.25);

          &:hover {
            color: rgba(0, 0, 0, 0.45);
          }
        }

        .ant-input-search-button {
          border-left-color: #d9d9d9;
          background-color: transparent;
          color: rgba(0, 0, 0, 0.45);
          width: 28px;
          min-width: 28px;

          &:hover {
            color: rgba(0, 0, 0, 0.85);
            border-color: #d9d9d9;
            background-color: rgba(0, 0, 0, 0.02);
          }
        }
      }
    }

    .connectionStatus {
      display: flex;
      align-items: center;
      padding: 4px 8px;
      border-radius: 4px;
      background: rgba(0, 0, 0, 0.02);
      transition: all 0.3s ease;

      &:hover {
        background: rgba(0, 0, 0, 0.04);
      }
    }
  }

  .magicWand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, #722ed1 0%, #1890ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: rotate(-15deg);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(114, 46, 209, 0.3));
    position: relative;

    &::before {
      content: '✨';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, #722ed1 0%, #1890ff 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      opacity: 0.5;
      filter: blur(4px);
      transform: scale(1.2);
      z-index: -1;
    }
  }

  .actionButton {
    height: 32px;
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;

    .anticon {
      font-size: 16px;
    }

    &:hover {
      background: rgba(0, 0, 0, 0.06);
    }

    &:active {
      background: rgba(0, 0, 0, 0.1);
    }

    &[disabled] {
      color: rgba(0, 0, 0, 0.25);
      background: transparent;
      cursor: not-allowed;
    }

    &:not(:disabled) {
      &:hover {
        background: rgba(114, 46, 209, 0.08);

        .magicWand {
          transform: rotate(0deg) scale(1.2);
          filter: drop-shadow(0 0 4px rgba(114, 46, 209, 0.5));

          &::before {
            opacity: 0.8;
            transform: scale(1.4);
            filter: blur(6px);
          }
        }
      }

      &:active {
        background: rgba(114, 46, 209, 0.12);

        .magicWand {
          transform: rotate(-25deg) scale(0.95);
          filter: drop-shadow(0 0 2px rgba(114, 46, 209, 0.3));

          &::before {
            opacity: 0.3;
            transform: scale(1.1);
            filter: blur(3px);
          }
        }
      }
    }

    &[disabled] .magicWand {
      opacity: 0.5;
      filter: none;

      &::before {
        opacity: 0;
      }
    }

    &.ant-btn-loading .magicWand {
      opacity: 0;
    }
  }

  .content {
    flex: 1;
    position: relative;

    .exitFull {
      position: absolute;
      right: 15px;
      top: 15px;
      color: #222;
      background: rgba(255, 255, 255, 0.9);

      &:hover {
        background: #fff;
      }
    }

    .logsContainer {
      height: 600px;
      display: flex;
      gap: 16px;
      position: relative;

      .fullScreenConatiner {
        flex: 1;

        .logs {
          flex: 1;
          min-width: 0;
          height: 600px;
          box-sizing: border-box;
          overflow: scroll;
          overflow: auto;
          background: #1e1e1e;
          border-radius: 8px;
          padding: 12px;
          font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
          font-size: 12px;
          line-height: 1.5;
          color: #d4d4d4;
          position: relative;

          &::-webkit-scrollbar {
            width: 8px;
            height: 8px;
          }

          &::-webkit-scrollbar-track {
            background: rgba(147, 112, 219, 0.05);
            border-radius: 4px;
          }

          &::-webkit-scrollbar-thumb {
            background: rgba(147, 112, 219, 0.2);
            border-radius: 4px;
            border: 2px solid transparent;
            background-clip: padding-box;

            &:hover {
              background: rgba(147, 112, 219, 0.3);
              border: 2px solid transparent;
              background-clip: padding-box;
            }
          }

          .logEntry {
            display: flex;
            gap: 8px;
            padding: 2px 0;
            word-break: break-all;
            white-space: pre-wrap;

            .timestamp {
              color: #6a9955;
              user-select: none;
            }

            .content {
              flex: 1;
              white-space: pre-wrap;
              word-break: break-all;
            }

            .errorContent {
              flex: 1;
              white-space: pre-wrap;
              word-break: break-all;
              color: #f14c4c;
            }

            .highlight {
              background-color: #ffd700;
              color: #000000;
              border-radius: 2px;
              padding: 0 2px;
            }
          }
        }
      }

      .diagnosisPanel {
        width: 400px;
        min-height: 200px;
        max-height: min(100%, 600px);
        background: #2b1d3c;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(147, 112, 219, 0.2);
        backdrop-filter: blur(8px);
        z-index: 10;
        animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);

        .diagnosisHeader {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding: 12px;
          background: linear-gradient(
            135deg,
            rgba(147, 112, 219, 0.15) 0%,
            rgba(43, 29, 60, 0.95) 100%
          );
          border-bottom: 1px solid rgba(147, 112, 219, 0.2);
          border-radius: 12px 12px 0 0;
          color: #e6e6fa;
          font-size: 14px;
          font-weight: 500;
          backdrop-filter: blur(4px);

          .diagnosisHeader_aiIcon {
            width: 18px;
            height: 18px;

            img {
              width: 100%;
              height: 100%;
            }
          }

          .stopButton {
            color: rgba(255, 255, 255, 0.45);
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            margin-right: 8px;
            position: relative;
            overflow: hidden;

            &::before {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              background: rgba(255, 77, 79, 0);
              transition: background 0.3s ease;
              z-index: 0;
            }

            :global(.anticon) {
              font-size: 16px;
              transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
              position: relative;
              z-index: 1;
            }

            &:hover {
              color: #ff4d4f;
              transform: scale(1.05);

              &::before {
                background: rgba(255, 77, 79, 0.15);
              }

              :global(.anticon) {
                transform: rotate(180deg) scale(1.1);
              }
            }

            &:active {
              transform: scale(0.95);

              &::before {
                background: rgba(255, 77, 79, 0.25);
              }
            }
          }

          button {
            color: rgba(230, 230, 250, 0.85);
            transition: all 0.3s ease;
            border-radius: 6px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;

            &:hover {
              color: #fff;
              background: rgba(147, 112, 219, 0.2);
              transform: scale(1.05);
            }

            &:active {
              transform: scale(0.95);
            }
          }
        }

        .diagnosisBody {
          position: relative;
          width: 400px;
          overflow-y: auto;
          height: 100%;
          box-sizing: border-box;
          border-radius: 0 0 12px 12px;

          &::-webkit-scrollbar {
            width: 8px;
            height: 8px;
          }

          &::-webkit-scrollbar-track {
            background: rgba(147, 112, 219, 0.05);
            border-radius: 4px;
          }

          &::-webkit-scrollbar-thumb {
            background: rgba(147, 112, 219, 0.2);
            border-radius: 4px;
            border: 2px solid transparent;
            background-clip: padding-box;

            &:hover {
              background: rgba(147, 112, 219, 0.3);
              border: 2px solid transparent;
              background-clip: padding-box;
            }
          }

          .diagnosisContent {
            color: #d4d4d4;
            background: #2b1d3c;
            border-radius: 0 0 12px 12px;
            padding: 16px;
            font-size: 14px;
            line-height: 1.6;
            box-sizing: border-box;
            word-wrap: break-word;

            .diagnosisLoading,
            .diagnosisError {
              display: flex;
              flex-direction: column;
              align-items: center;
              justify-content: center;
              min-height: 200px;
              gap: 16px;
              text-align: center;
              color: #d4d4d4;

              :global(.ant-spin) {
                .ant-spin-dot-item {
                  background-color: #9370db;
                }
              }

              p {
                font-size: 14px;
                color: rgba(230, 230, 250, 0.85);
              }
            }

            h1,
            h2,
            h3 {
              color: #e6e6fa;
              margin-bottom: 16px;
              font-weight: 600;
              letter-spacing: -0.01em;
            }

            h1 {
              font-size: 20px;
            }

            h2 {
              font-size: 18px;
              margin-top: 24px;
              padding-bottom: 8px;
              border-bottom: 1px solid rgba(147, 112, 219, 0.2);
            }

            h3 {
              font-size: 16px;
              margin-top: 20px;
            }

            p {
              margin-bottom: 16px;
              line-height: 1.7;
            }

            ul,
            ol {
              padding-left: 24px;
              margin-bottom: 16px;
            }

            li {
              margin-bottom: 8px;
            }

            code {
              background: rgba(147, 112, 219, 0.1);
              padding: 2px 6px;
              border-radius: 4px;
              font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
              font-size: 13px;
            }

            pre {
              background: rgba(20, 15, 30, 0.8);
              padding: 16px;
              border-radius: 8px;
              margin-bottom: 16px;
              overflow-x: auto;
              border: 1px solid rgba(147, 112, 219, 0.1);

              &::-webkit-scrollbar {
                width: 8px;
                height: 8px;
              }

              &::-webkit-scrollbar-track {
                background: rgba(147, 112, 219, 0.05);
                border-radius: 4px;
              }

              &::-webkit-scrollbar-thumb {
                background: rgba(147, 112, 219, 0.2);
                border-radius: 4px;
                border: 2px solid transparent;
                background-clip: padding-box;

                &:hover {
                  background: rgba(147, 112, 219, 0.3);
                  border: 2px solid transparent;
                  background-clip: padding-box;
                }
              }

              code {
                background: none;
                padding: 0;
              }
            }

            :global {
              .markdown-body {
                color: #d4d4d4;
                background: transparent;
                padding: 16px;

                h1,
                h2,
                h3,
                h4,
                h5,
                h6 {
                  color: rgba(230, 230, 250, 0.95);
                  border-bottom: 1px solid rgba(147, 112, 219, 0.2);
                  margin-top: 24px;
                  margin-bottom: 16px;
                  font-weight: 600;
                  line-height: 1.25;
                }

                h1 {
                  font-size: 24px;
                }

                h2 {
                  font-size: 20px;
                }

                h3 {
                  font-size: 18px;
                }

                h4 {
                  font-size: 16px;
                }

                h5 {
                  font-size: 14px;
                }

                h6 {
                  font-size: 13px;
                }

                pre {
                  background: rgba(0, 0, 0, 0.4);
                  border: 1px solid rgba(147, 112, 219, 0.5);
                  border-radius: 6px;
                  padding: 12px;
                  margin: 12px 0;
                  overflow-x: auto;

                  code {
                    background: transparent;
                    padding: 0;
                    color: #f0e6ff;
                  }
                }

                code {
                  background: rgba(147, 112, 219, 0.2);
                  padding: 2px 6px;
                  border-radius: 4px;
                  color: #f0e6ff;
                  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
                }

                ul,
                ol {
                  padding-left: 24px;
                  margin: 8px 0;

                  li {
                    margin: 4px 0;
                  }
                }

                blockquote {
                  color: rgba(230, 230, 250, 0.85);
                  border-left: 4px solid rgba(147, 112, 219, 0.4);
                  background: rgba(147, 112, 219, 0.1);
                  margin: 16px 0;
                  padding: 12px 16px;
                  border-radius: 0 8px 8px 0;
                }

                a {
                  color: #9370db;
                  text-decoration: none;
                  transition: all 0.2s ease;
                  border-bottom: 1px solid transparent;

                  &:hover {
                    color: lighten(#9370db, 10%);
                    border-bottom-color: currentColor;
                  }
                }

                table {
                  border-collapse: separate;
                  border-spacing: 0;
                  width: 100%;
                  margin: 16px 0;
                  border-radius: 8px;
                  border: 1px solid rgba(147, 112, 219, 0.2);
                  overflow: hidden;

                  th,
                  td {
                    border: 1px solid rgba(147, 112, 219, 0.2);
                    padding: 12px;
                  }

                  th {
                    background: rgba(147, 112, 219, 0.1);
                    font-weight: 600;
                    text-align: left;
                  }

                  tr {
                    background-color: transparent;
                    transition: background-color 0.2s ease;

                    &:nth-child(2n) {
                      background-color: rgba(147, 112, 219, 0.05);
                    }

                    &:hover {
                      background-color: rgba(147, 112, 219, 0.1);
                    }
                  }
                }

                hr {
                  border: none;
                  height: 1px;
                  background: linear-gradient(
                    to right,
                    rgba(147, 112, 219, 0.1),
                    rgba(147, 112, 219, 0.4),
                    rgba(147, 112, 219, 0.1)
                  );
                  margin: 24px 0;
                }
              }
            }
          }

          .streamingIndicator {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 16px;

            .dot {
              width: 6px;
              height: 6px;
              background-color: #4447c3;
              border-radius: 50%;
              opacity: 0.3;
              animation: dotPulse 1.4s infinite;

              &:nth-child(2) {
                animation-delay: 0.2s;
              }

              &:nth-child(3) {
                animation-delay: 0.4s;
              }
            }
          }

          .streamingIndicatorFixed {
            position: sticky;
            bottom: 0;
            left: 0;
            right: 0;
          }
        }
      }
    }
  }

  :global {
    .diagnosisDrawer {
      position: absolute !important;
      top: 0 !important;
      right: 0 !important;
      height: 100% !important;

      .ant-drawer-content-wrapper {
        height: 100% !important;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15) !important;
      }

      .ant-drawer-header {
        background: linear-gradient(
          135deg,
          rgba(147, 112, 219, 0.15) 0%,
          rgba(43, 29, 60, 0.95) 100%
        );
        border-bottom: 1px solid rgba(147, 112, 219, 0.2);
        padding: 16px 24px;

        .ant-drawer-title {
          color: #e6e6fa;
          font-size: 16px;
          font-weight: 600;
          letter-spacing: 0.5px;

          .anticon {
            margin-right: 8px;
            color: #e6e6fa;
          }
        }

        .ant-drawer-close {
          color: rgba(230, 230, 250, 0.85);

          &:hover {
            color: #fff;
            background: rgba(147, 112, 219, 0.2);
          }
        }
      }

      .ant-drawer-body {
        background: #1f1a2e;
        padding: 24px;
        height: calc(100% - 55px);
        overflow-y: auto;

        &::-webkit-scrollbar {
          width: 8px;
        }

        &::-webkit-scrollbar-track {
          background: rgba(147, 112, 219, 0.1);
        }

        &::-webkit-scrollbar-thumb {
          background: rgba(147, 112, 219, 0.2);
          border-radius: 4px;

          &:hover {
            background: rgba(147, 112, 219, 0.3);
          }
        }
      }

      .diagnosisContent {
        color: rgba(230, 230, 250, 0.85);
        font-size: 14px;
        line-height: 1.6;

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
          color: #e6e6fa;
          margin-bottom: 16px;
          font-weight: 600;
        }

        h2 {
          font-size: 18px;
          border-bottom: 1px solid rgba(147, 112, 219, 0.2);
          padding-bottom: 8px;
          margin-top: 24px;
        }

        p {
          margin-bottom: 16px;
        }

        ul,
        ol {
          padding-left: 24px;
          margin-bottom: 16px;
        }

        li {
          margin-bottom: 8px;
        }

        code {
          background: rgba(147, 112, 219, 0.1);
          padding: 2px 6px;
          border-radius: 4px;
          font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
          font-size: 13px;
        }

        pre {
          background: rgba(20, 15, 30, 0.8);
          padding: 16px;
          border-radius: 8px;
          margin-bottom: 16px;
          overflow-x: auto;
          border: 1px solid rgba(147, 112, 219, 0.1);

          code {
            background: none;
            padding: 0;
          }
        }
      }

      .diagnosisLoading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: #e6e6fa;

        p {
          margin-top: 16px;
        }
      }
    }
  }
}

@keyframes dotPulse {
  0% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.3;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}
